package free;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@interface Component{}


public class reflec {
    public static void main(String args[]) throws Exception{
        Class<?> cls = Class.forName("java.util.Date");
        boolean flag = cls.isAnnotationPresent(Component.class);
        System.out.println(flag);
        if(flag){
            Object ob1=cls.newInstance();
            System.out.println(ob1);
        }

    }

}
